using Microsoft.VisualBasic.CompilerServices;
using SJVars;
using Spacejock;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
using yWriter6.My.Resources;

namespace yWriter6
{
	[DesignerGenerated]
	public class frmRestoreAutobackup : Form
	{
		private IContainer components;

		[CompilerGenerated]
		[AccessedThroughProperty("listAB")]
		private ListBox _listAB;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdRestore")]
		private Button _cmdRestore;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdCancel")]
		private Button _cmdCancel;

		public bool Cancelled;

		[field: AccessedThroughProperty("listAB")]
		internal virtual ListBox listAB
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		internal virtual Button cmdRestore
		{
			[CompilerGenerated]
			get
			{
				return _cmdRestore;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdRestore_Click;
				Button cmdRestore = _cmdRestore;
				if (cmdRestore != null)
				{
					cmdRestore.Click -= value2;
				}
				_cmdRestore = value;
				cmdRestore = _cmdRestore;
				if (cmdRestore != null)
				{
					cmdRestore.Click += value2;
				}
			}
		}

		internal virtual Button cmdCancel
		{
			[CompilerGenerated]
			get
			{
				return _cmdCancel;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdCancel_Click;
				Button cmdCancel = _cmdCancel;
				if (cmdCancel != null)
				{
					cmdCancel.Click -= value2;
				}
				_cmdCancel = value;
				cmdCancel = _cmdCancel;
				if (cmdCancel != null)
				{
					cmdCancel.Click += value2;
				}
			}
		}

		public frmRestoreAutobackup()
		{
			base.FormClosing += frmRestoreAutobackup_FormClosing;
			base.Load += frmRestoreAutobackup_Load;
			InitializeComponent();
		}

		[DebuggerNonUserCode]
		protected override void Dispose(bool disposing)
		{
			try
			{
				if (disposing && components != null)
				{
					components.Dispose();
				}
			}
			finally
			{
				base.Dispose(disposing);
			}
		}

		[System.Diagnostics.DebuggerStepThrough]
		private void InitializeComponent()
		{
			listAB = new System.Windows.Forms.ListBox();
			cmdRestore = new System.Windows.Forms.Button();
			cmdCancel = new System.Windows.Forms.Button();
			SuspendLayout();
			listAB.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			listAB.FormattingEnabled = true;
			listAB.ItemHeight = 16;
			listAB.Location = new System.Drawing.Point(12, 12);
			listAB.Name = "listAB";
			listAB.Size = new System.Drawing.Size(394, 260);
			listAB.TabIndex = 0;
			cmdRestore.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
			cmdRestore.Location = new System.Drawing.Point(331, 294);
			cmdRestore.Name = "cmdRestore";
			cmdRestore.Size = new System.Drawing.Size(75, 27);
			cmdRestore.TabIndex = 1;
			cmdRestore.Text = "Restore";
			cmdRestore.UseVisualStyleBackColor = true;
			cmdCancel.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
			cmdCancel.Location = new System.Drawing.Point(12, 294);
			cmdCancel.Name = "cmdCancel";
			cmdCancel.Size = new System.Drawing.Size(75, 27);
			cmdCancel.TabIndex = 2;
			cmdCancel.Text = "Cancel";
			cmdCancel.UseVisualStyleBackColor = true;
			base.AutoScaleDimensions = new System.Drawing.SizeF(8f, 16f);
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			base.ClientSize = new System.Drawing.Size(418, 329);
			base.Controls.Add(cmdCancel);
			base.Controls.Add(cmdRestore);
			base.Controls.Add(listAB);
			base.Name = "frmRestoreAutobackup";
			Text = "Restore Autobackup";
			ResumeLayout(false);
		}

		private void cmdCancel_Click(object sender, EventArgs e)
		{
			Cancelled = true;
			Hide();
		}

		private void cmdRestore_Click(object sender, EventArgs e)
		{
			Cancelled = false;
			Hide();
		}

		private void frmRestoreAutobackup_FormClosing(object sender, FormClosingEventArgs e)
		{
			if (e.CloseReason == CloseReason.UserClosing)
			{
				Cancelled = true;
			}
			clsShared.cSettings.StoreWindowSettings("RestoreAutobackup", this);
		}

		private void frmRestoreAutobackup_Load(object sender, EventArgs e)
		{
			base.Icon = Resources.yWriter5_Ico;
			clsSettings cSettings = clsShared.cSettings;
			Form Form = this;
			cSettings.ReadWindowSettings("RestoreAutobackup", ref Form);
		}
	}
}
